function NetModel(host) {
  var _host = host || '/apis';

  this.http = function (param) {
    $.ajax({
      url: _host + param.url,
      data: param.data,
      type: 'POST',
      dataType: 'json',
      success: param.success
    })
  }
}

var Hub = {};

Hub.warn = function(msg) {
  bootoast.toast({
    message: msg,
    type: 'warning',
    position: 'top-center'
  })
};


Hub.danger = function(msg) {
  bootoast.toast({
    message: msg,
    type: 'danger',
    position: 'top-center'
  })
}